/*
 * @Description:
 * @Author: william
 * @Date: 2025-07-04 14:32:56
 * @LastEditors: william
 * @LastEditTime: 2025-10-28 16:40:56
 */
const prefix = '/app'

// ------------------- 用户密码登录 --------------------
export const apiLogin = data => g_http.post(`${prefix}/login`, data)

// ------------------- 获取系统时间 --------------------
export const apiGetSystemTime = (data = {}) =>
  g_http.get(
    `${prefix}/getSystemTime`,
    {
      ...data,
      showToast: false
    },
    {},
    {
      timeout: 3000
    }
  )

// ------------------- 查询登录用户信息 --------------------
export const apiGetLoginUser = data =>
  g_http.get(`${prefix}/getLoginUser`, data)

// ------------------- 检测网络连通性 --------------------
export const apiCheckNetwork = (data = {}) =>
  g_http.get(
    `${prefix}/checkNetwork`,
    {
      ...data,
      showToast: false
    },
    {},
    {
      timeout: 3000
    }
  )
